{% if page.submenu %}
<div class="submenu">
    {% for collection in site.data.collections %}
        {% if collection.id == page.submenu %} 
            <h4>
                <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-submenu"></use>
                </svg>{{ collection.name }}
            </h4>
            <ul>
            {% for article in collection.articles %}
                <li>
                    {% if article.url contains "://" %}
                    <a href="{{ article.url }}" class="extlinks">
                        {{ article.name }}
                    </a>
                    {% else %}
                    <a href="{{ article.url | prepend: site.baseurl }}">
                        {{ article.name }}
                    </a>
                    {% endif %}
                </li>
            {% endfor %}
            </ul>
        {% endif %}
    {% endfor %}
{% else %}
<div class="submenu hidden">
{% endif %}
</div>